package com.memoir.controller.view;

import com.memoir.common.response.ServerResponse;
import com.memoir.service.view.ImageViewFontService;
import com.memoir.model.vo.rep.font.QueryViewImagesRepVo;
import com.memoir.model.vo.req.font.QueryViewImagesReqVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@Api("图库首页管理")
@RestController
@RequestMapping("/imgView")
@AllArgsConstructor
public class ImageViewController {

    private final ImageViewFontService imageViewFontService;

    @ApiOperation("获取所有的空间数据")
    @RequestMapping("/fontViewImages")
    public ServerResponse queryViewImages(@RequestBody QueryViewImagesReqVo param){
       List<QueryViewImagesRepVo> dataList = imageViewFontService.queryImageSpaceList(param);
        return ServerResponse.buildSuccess(dataList);
    }
}
